package com.azt.exception;

import java.util.Map;

/**
 * 异常信息基类 Created by shangwq on 2016/8/7.
 */
public class BaseException extends RuntimeException {
	private String errorCode;
	private Object[] errorParams;
	private Map<?, ?> errorData;
	private Object data;

	public BaseException() {
	}

	public BaseException(Object data) {
		this.data = data;
	}

	public BaseException(String errorCode) {
		this.errorCode = errorCode;
	}

	public BaseException(String errorCode, Object[] errorParams) {
		super();
		this.errorCode = errorCode;
		this.errorParams = errorParams;
	}

	public BaseException(String errorCode, Object[] errorParams, Map<?, ?> errorData) {
		super();
		this.errorCode = errorCode;
		this.errorParams = errorParams;
		this.errorData = errorData;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public Object[] getErrorParams() {
		return errorParams;
	}

	public Map<?, ?> getErrorData() {
		return errorData;
	}

	public void setErrorData(Map<?, ?> errorData) {
		this.errorData = errorData;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
}
